// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取部门列表 GET /api/v1/permModule/ */
export async function permModuleList(options?: { [key: string]: any }) {
  return request<API.PermModuleList>('/api/v1/permModule/', {
    method: 'GET',
    params: {...(options || {})},
  });
}

/** 新建权限 POST /api/v1/permModule */
export async function permModuleAdd(body: API.PermModuleItem, options?: { [key: string]: any }) {
  return request<API.CustomerResponse<any>>('/api/v1/permModule/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取部门列表 GET /api/v1/perm/ */
export async function permList(options?: { [key: string]: any }) {
  return request<API.PermList>('/api/v1/perm/', {
    method: 'GET',
    params: {...(options || {})},
  });
}

/** 新建权限 POST /api/v1/perm */
export async function permAdd(body: API.PermModuleItem, options?: { [key: string]: any }) {
  return request<API.CustomerResponse<any>>('/api/v1/perm/', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

